import java.util.Scanner;

import coreSimulation.DropOffDesk;
import coreSimulation.PassengerList;
import coreSimulation.Queue;

public class BaggageQueueSimulator {

	public static void main(String[] args) {

		Queue queue = new Queue();
		PassengerList passengerList = new PassengerList();
		DropOffDesk desk = new DropOffDesk();
		String listOfPassengers = "PassengerList.csv";
		String reportFileName = "report.txt";

		Scanner scanner = new Scanner(System.in);
		System.out.println("Press any key to import passenger information.");
		scanner.nextLine();

		// import the list of passengers and baggage into the queue and
		// report the number of successfully imported passengers
		System.out.println(queue.addBulk(listOfPassengers)
				+ " passengers imported");

		System.out
				.println("\n\n\nPress any key to process passengers' baggage in the queue.");
		scanner.nextLine();

		// process the queue of passengers and calculate their excess baggage
		// charges
		desk.processQueue(queue, passengerList);

		System.out.println("\n\n\nPress any key to generate a report.");
		scanner.nextLine();
		System.out.println(passengerList.getReport());

		// write the report of stats from the processed passengers/baggage
		passengerList.writeReport(reportFileName);

		scanner.close();

	}

}
